package io.renren.common.exception;


import io.renren.common.constants.enums.ResponseStatus;

/**
 * @Auther: miaoguoxin
 * @Date: 2019/10/27 14:39
 * @Description: 基础异常封装
 */
public abstract class BaseException extends RuntimeException{
    /**对应错误码*/
    private int errCode;

    public BaseException(String message, int errCode) {
        super(message);
        this.errCode = errCode;
    }

    public BaseException(ResponseStatus responseStatus) {
        this(responseStatus.getDesc(),responseStatus.getValue());
    }

    public int getErrCode() {
        return errCode;
    }

    public void setErrCode(int errCode) {
        this.errCode = errCode;
    }
}
